Skip to content

Instantly share code, notes, and snippets.

@BIGBALLON
BIGBALLON / extract_ILSVRC.sh
Created May 13, 2018 20:09
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@dSalieri
dSalieri / index.md
Last active May 9, 2024 09:40
Аргумент resolve внутри Promise и Promise.resolve работают ли они одинаково?

Вопрос: Есть две цепочки promise, которые выводят сообщения в консоль. Первый выводит: tick1, tick2, tick3. Второй: tick3, tick1, tick2

Код 1:

/// Код 1
const p = new Promise(resovle => setTimeout(resovle));

new Promise(resolve => resolve(p)).then(() => {
    console.log("tick 3");
});
@nicc777
nicc777 / k3s-multipass.sh
Last active May 9, 2024 09:37 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
#!/usr/bin/env bash
# Refer to https://github.com/k3s-io/k3s/releases for your prefered release
export INSTALL_K3S_VERSION="v1.24.10+k3s1"
for node in node1 node2 node3;do
multipass launch -n $node -c 2 -m 4G
done
# Init cluster on node1

A Few Useful Things to Know about Machine Learning

The paper presents some key lessons and "folk wisdom" that machine learning researchers and practitioners have learnt from experience and which are hard to find in textbooks.

1. Learning = Representation + Evaluation + Optimization

All machine learning algorithms have three components:

  • Representation for a learner is the set if classifiers/functions that can be possibly learnt. This set is called hypothesis space. If a function is not in hypothesis space, it can not be learnt.
  • Evaluation function tells how good the machine learning model is.
  • Optimisation is the method to search for the most optimal learning model.
@benclmnt
benclmnt / advice.md
Last active May 9, 2024 09:36
NUS CS Planning

Module Planning

Here be some of my notes on how to plan your CS career (specifically NUS).

First things first, I encourage you to have your own module plan (say, in a Google Sheets). You can start with the suggested module plan, but they are quite generic and might not suit your personal goals (e.g. some advanced modules you'd like to take have prerequisites that are offered in odd semesters only).

Having your own module plan will also make you easier to include other non-academic activities too.

General advice

  • Take as many foundational (core) modules while you can. You never want to be left behind due to missing prerequisites.
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active May 9, 2024 09:35
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@cbuckowitz
cbuckowitz / README.md
Last active May 9, 2024 09:33
Change Storage Location for Docker Desktop with WSL2 #DockerDesktop #WSL2

Change the Storage Location for Docker Desktop with WSL2

Docker Desktop stores docker data in 2 distros

  • docker-desktop
  • docker-desktop-data

These distros are installed on the system drive by default.

To move them to another drive, these distros can be exported, deleted and imported from the new location.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 09:31
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mackandelius
mackandelius / CV1_FBT.md
Last active May 9, 2024 09:29
Oculus Rift CV1 as Full body tracking

(This is a guide that I can in the future link to because I spend far too much time writing this over and over again.)

Summary:

Reusing your old Rift or a second hand Rift for Full Body Tracking (FBT) is a good and cheap solution for FBT. With three touch controllers (legs and hip) it is akin to Vive trackers in tracking quality, while being superior with its AA batteries, which allows you theoretically infinite battery life. (PLEASE USE RECHARGEABLE AA BATTERIES)

Required Hardware:

@balmeida-nokia
balmeida-nokia / wsl2_ciscoanyconnect_workaround.md
Last active May 9, 2024 09:28 — forked from pyther/wsl2_ciscoanyconnect_workaround.md
WSL 2 Cisco AnyConnect Networking Workaround

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Acknowledges